<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>新增/修改广告位</title>
    {sys:load href="admin/css/bootstrap.min.css,admin/css/materialdesignicons.min.css,admin/css/style.min.css,admin/lib/layui/css/layui.css"}

    <!-- 加载百度编辑器插件 -->
    {sys:load href="admin/lib/ueditor/ueditor.config.js,admin/lib/ueditor/ueditor.all.min.js"}

    <!-- 加载layui插件 -->
    {sys:load href="admin/lib/layui/layui.js,admin/common.js"}
</head>

<body>
<div class="container-fluid p-t-15">

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-body">

                    <form action="/app/cms/admin.advert/posdata" method="post" class="row" id="position">
                        <div class="form-group col-md-12">
                            <label for="title">广告位名称:</label>
                            <input type="text" class="form-control" id="title" name="title" value="{$detail.title}" placeholder="" autocomplete="off" />
                        </div>

                        <div class="form-group col-md-12">
                            <label for="desc">广告位描述:</label>
                            <input type="text" class="form-control" id="desc" name="desc" value="{$detail.desc}" placeholder="" autocomplete="off" />
                        </div>

                        <div class="form-group col-md-12">
                            <input type="hidden" name="id" value="{$detail.id}" />
                            <button type="button" class="btn btn-primary btn-submit" form-id="position">确 定</button>
                        </div>
                    </form>

                </div>
            </div>
        </div>

    </div>
</div>

<script type="text/javascript">

    layui.use(['Request','jquery','layer','laydate','upload'], function(){
        var Request = layui.Request,$ = layui.jquery,layer = layui.layer,laydate = layui.laydate,upload = layui.upload;

        $(".btn-submit").click(function(){
            Request.postInSubmit(".btn-submit", function(response){
                layer.msg('操作成功', {time:2000}, function(){
                    parent.location.reload()
                })
            })
        });
    })
</script>
</body>
</html>
